v1=reshape(d1,15,3223,15);
v2=reshape(d2,15,277,15);

joints=[1,2;4,7;3,4;3,7;3,10;3,13;4,5;7,8;5,6;8,9;10,13;10,11;13,14;11,12;14,15];


for i=1:15
    
    joint1=joints(i,1);
    joint2=joints(i,2);
    h1=figure;
    hist(v1(joint1,:,joint2),300);
    print(h1,'-dpng',strcat('hist1_',num2str(joint1),'_',num2str(joint2),'.png'));
    h2=figure;
    hist(v2(joint1,:,joint2),30);
    print(h2,'-dpng',strcat('hist2_',num2str(joint1),'_',num2str(joint2),'.png'));
    
end